package com.klikmee.sms.chat.web.dao;

import java.util.List;

import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import javax.persistence.TypedQuery;

import com.klikmee.sms.services.chat.model.ChatMember;

public class ChatMemberDao extends AbstractDAO<ChatMember> {

	@PersistenceContext
	private EntityManager em;
	
	public ChatMemberDao() {
		super(ChatMember.class);
	}
	
	public List<String> findAllMembersAliases(){
		TypedQuery<String> query = em.createQuery("SELECT cm.alias FROM ChatMember AS cm", String.class);
		return query.getResultList();
	}
	
}
